<script setup>
import { ref } from 'vue'

const props = defineProps({
  title: {
    type: String,
    default: '提示',
  },
  width: {
    type: String,
    default: '600px',
  },
})
const visible = ref(false)

const open = () => {
  visible.value = true
}

const close = () => {
  visible.value = false
}

defineExpose({
  open,
  close,
})
</script>

<template>
  <a-modal v-model:open="visible" :title="title" :footer="null" :width="width" destroyOnClose>
    <slot></slot>
  </a-modal>
</template>
